import schoolType from "./schoolType";

const initState = {
  tableData: {
    data: [],
    count: 0
  }
};

const schoolReducers = (state = initState, action: any) => {
  switch (action.type) {
    case schoolType.GET_SCHOOL_TABLE:
      return {
        ...state,
        tableData: {
          ...action.payload
        }
      };

    default:
      return state;
  }
};

export default schoolReducers;
